#ifndef CLICK_CISCYFILTER_HH
#define CLICK_CISCYFILTER_HH
#include <click/element.hh>
CLICK_DECLS

class CiscyFilter : public Element { public:
  
    CiscyFilter();
    ~CiscyFilter();

    const char *class_name() const		{ return "CiscyFilter"; }
    const char *port_count() const		{ return "1/1-2"; }
    const char *processing() const		{ return PUSH; }

    int initialize(ErrorHandler *);
    void push(int port, Packet *);

  public:

    struct Insn {
	uint32_t cmd;
	union {
	    uint32_t arg[7];
	    uint16_t sarg[14];
	};
    };

    Vector<Insn> _insn;

    enum { D_EQ = 0 << 24, D_MEQ = 1 << 24, D_LEQ = 2 << 24, D_SRNG = 3 << 24,
	   L1_SEQ = 4 << 24, L1_SRNG = 5 << 24, L1_LEQ = 6 << 24,
	   L2_LEQ = 7 << 24, L2_LEQ_M = 8U << 24,
	   D_EQ2 = 9U << 24, L1_SEQ2 = 10U << 24,
	   OPMASK = 15U << 24,
	   NARGSHIFT = 16, NARGMASK = 255, NEG = 0x8000, OFFSETMASK = 0x7FFF
    } Cmd;
    
};

CLICK_ENDDECLS
#endif
